<?php

namespace app\admin\model;

class Menu extends BaseModel
{
    //获取所有权限信息
    public function getMenusAll()
    {
        $data = $this->where(['status'=>config('code.status_normal')])->select();
        return $data;
    }
    //获取指定id的单条权限信息
    public function getMenusInfoById($id = 0)
    {
        $this->get(['id'=>$id,'status'=>config('code.status_normal')]);
    }
    //获取管理员权限信息
    public function getMenusByAdminMenus($data = [])
    {
        return $this->where(['id'=>['in',$data['menus']]])->select();
    }
}
